#pragma once

#include <typedef.h>
//
#if defined(CONFIG_TAR4ESP32)
#include "esp_event.h"
#include "esp_log.h"
#include "esp_mac.h"
#include "esp_netif.h"
#include "esp_netif_net_stack.h"
#include "esp_wifi.h"
#include "freertos/FreeRTOS.h"
#include "freertos/event_groups.h"
#include "freertos/task.h"
#include "lwip/inet.h"
#include "lwip/netdb.h"
#include "lwip/sockets.h"
#include "nvs_flash.h"
#if IP_NAPT
#include "lwip/lwip_napt.h"
#endif
#include "lwip/err.h"
#include "lwip/sys.h"
#endif
//
#include <task_run.hpp>

class Wifi
{
public:
	Wifi();
	virtual ~Wifi();
	static Wifi* Instance(void);
	void Start(void);

private:
	void StartStation(void);
	void StartApSoft(void);

private:
	std::string m_Ssid;
	std::string m_Passwd;
#if defined(CONFIG_TAR4ESP32)
	esp_netif_t* esp_netif_ap;
	esp_netif_t* esp_netif_sta;
#endif
};
